<div class="page_ordercenter">
    <header class="navbar navbar-fixed-top container-fuild navbar-default">
        <div class="row clearfix">
            <div class="col-xs-4 go text-left">
                <button ui-sref="center" class="btn icon-ss-left text-primary">返回</button>
            </div>
            <div class="col-xs-4 text-center title text-primary">
                订单列表
            </div>
        </div>
    </header>
    <nav class="switch text-center navbar navbar-default">
        <!-- 订单状态： 2：待支付 1：已支付 0：已废除 -->
        <div class="btn-group">
            <label class="btn btn-default" ng-model="radioModel" uib-btn-radio="2" ng-click="changeState(2)">待支付</label>
            <label class="btn btn-default" ng-model="radioModel" uib-btn-radio="1" ng-click="changeState(1)">已支付</label>
            <label class="btn btn-default" ng-model="radioModel" uib-btn-radio="0" ng-click="changeState(0)">已取消</label>
        </div>
    </nav>
    <article>
        <section class="list">
            <div class="container ordeone clearfix" ng-repeat="v in orderlist">
                <div class="orderid panel clearfix">
                    <p>订单日期：<i ng-bind="v.insert_time"></i></p>

                    <p>订单号：<i ng-bind="v.order_id"></i> <i class="text-warning status"
                                                           ng-bind="v.order_status_name"></i></p>
                </div>
                <div class="cominfo panel clearfix row" ui-sref="pay({orderid:v.order_id})">
                    <p class="col-xs-4 compic text-center">
                        <img ng-src="{{one.brief_pic}}" alt="img" ng-repeat="one in v.order_commoditys">
                    </p>

                    <p class="col-xs-6 comname text-center">
                        {{v.order_commoditys[0].name}}<i ng-show="v.order_commoditys.length > 1">等{{v.order_commoditys.length}}件商品</i>
                    </p>

                    <p class="col-xs-2 icon text-center">
                        <i class="icon-ss-right"></i>
                    </p>
                </div>
                <div class="clearfix row">
                    <p class="col-xs-5 price">合计：<i class="text-warning">{{v.should_payment}}</i>元
                        <br/><i class="text-warning">{{v.payment_status_name}}</i></p>

                    <p class="col-xs-7 operate text-right" ng-show="v.order_status < 20">
                        <button class="btn btn-warning" ng-show="v.payment_status == 1"
                                ui-sref="pay({orderid:v.order_id})">去付款
                        </button>
                        <button class="btn btn-default" ng-click="cancelOrder(v.order_id, $index)"
                                ng-show="v.order_status <= 0 && v.payment_status < 10">取消订单
                        </button>
                    </p>
                </div>
            </div>
        </section>
    </article>
    <footer class="navbar-fixed-bottom container-fuild navbar text-center">
        <uib-pagination total-items="pageinfo.rows_count" ng-model="pageinfo.pageno" max-size="2" class="pagination-sm"
                        boundary-links="true" rotate="false" num-pages="pageinfo.pagesize" previous-text="前一页"
                        next-text="下一页" first-text="首页" last-text="尾页" items-per-page="15"
                        ng-change="pageChange()"></uib-pagination>
    </footer>
</div>
